<script>
	// let prd = {
	// 	price: 10,
	// 	count: 2
	// }
	// let total = prd.price * prd.count;
	// console.log(total);
	// prd.count = 5;
	// console.log(total); // 虽然count更新了，total不会更新


	
	let prd = {
		price: 10,
		count: 2
	}
	let total = 0;
	let effect = () => {
		total = prd.price * prd.count;
	}
	effect();
	console.log(total);
	prd.count = 5;
	effect();
	console.log(total);  


</script>